/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - graphics/shaders
// Copyright( c) 2014.  All Rights Reserved
//
// File:		AEShaderConstantTableEntry.cpp
// Author:		Gianluca Belardelli
// Date:		30/01/2015
//
/////////////////////////////////////////////////////////////////////////
#include <AEEngine.h>

AEINT32 GetRegisterCountFromValueType( AEValueType eType )
{
	switch( eType )
	{
	case AEVALUETYPE_UNKNOWN:
		return 0;
	case AEVALUETYPE_BOOL:
	case AEVALUETYPE_INT:
	case AEVALUETYPE_FLOAT:
		return 1;
	case AEVALUETYPE_FLOAT2:
		return 2;
	case AEVALUETYPE_FLOAT3:
		return 3;
	case AEVALUETYPE_FLOAT4:
		return 4;
	case AEVALUETYPE_FLOAT3x3:
		return 12;
	case AEVALUETYPE_FLOAT4x4:
		return 16;
	case AEVALUETYPE_STRING:
		return 1;
	case AEVALUETYPE_TEXTURE:
	case AEVALUETYPE_CUBEMAP:
	case AEVALUETYPE_TEXTURE3D:
		return 1;
	case AEVALUETYPE_BOOL2:
		return 2;
	case AEVALUETYPE_BOOL3:
		return 3;
	case AEVALUETYPE_BOOL4:
		return 4;
	case AEVALUETYPE_INT2:
		return 2;
	case AEVALUETYPE_INT3:
		return 3;
	case AEVALUETYPE_INT4:
		return 4;
	case AEVALUETYPE_UINT:
		return 1;
	case AEVALUETYPE_TEXTURE2DARRAY:
		return 1;
	case AEVALUETYPE_FLOAT4x3:
		return 12;
	case AEVALUETYPE_INCLUSION_TAG:
		return 0;
	}
	return 0;
}
